<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <img src="../../assets/images/404.png" alt="404" class="error-image" />
      <h1 class="error-title">404</h1>
      <h2 class="error-subtitle">页面不存在</h2>
      <p class="error-description">
        抱歉，您访问的页面不存在或已被移除
      </p>
      <div class="error-actions">
        <el-button type="primary" @click="goBack">返回上页</el-button>
        <el-button @click="goHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const goBack = () => {
  router.go(-1);
};

const goHome = () => {
  router.push('/dashboard');
};
</script>

<style scoped>
.not-found-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--el-bg-color);
}

.not-found-content {
  text-align: center;
  padding: 20px;
  max-width: 500px;
}

.error-image {
  width: 200px;
  height: auto;
  margin-bottom: 30px;
}

.error-title {
  font-size: 72px;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.2;
}

.error-subtitle {
  font-size: 24px;
  color: var(--el-text-color-primary);
  margin: 10px 0 20px;
}

.error-description {
  color: var(--el-text-color-secondary);
  margin-bottom: 30px;
  font-size: 16px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}
</style> 